<?php

/**
 * Description of LibertAPIWrapper
 *
 * @author Ho Huu Tai <hohuutai.uns@gmail.com>
 */
require_once 'liberty_api/ApiAgent.php';
class LibertAPIWrapper
{
    private $apiAgent;
    
    function __construct()
    {
        $auth = new Authentication(Constant::LR_ACC_ID, Constant::LR_API_NAME, Constant::LR_API_SECUREWORD);
        $this->apiAgent = ApiAgentFactory::createApiAgent(ApiAgentFactory::XML, $auth);
    }
    
    function checkLiberyAccountExist($accountToRetrieve)
    {
        if($this->apiAgent->accountName($accountToRetrieve))
        {
            return TRUE;
        }
        else
        {
            return FALSE;;
        }
    }
}

?>
